﻿using System; 

namespace CoolCode.Linq.Expressions
{
    /// <summary>
    /// custom exception for handling bad queries
    /// </summary>
    class InvalidQueryException :  Exception
    {
        private string message;

        /// <summary>
        /// init exception
        /// </summary>
        /// <param name="message">message to display</param>
        public InvalidQueryException(string message)
        {
            this.message = message + " ";
        }

        /// <summary>
        /// message to display
        /// </summary>
        public override string Message
        {
            get
            {
                return "The client query is invalid: " + message;
            }
        }
    }
}
